//
//  ViewController.m
//  testWebView
//
//  Created by ty804 on 04/04/2019.
//  Copyright © 2019 ty804. All rights reserved.
//
#import "ViewController.h"
#import "Objc_Name.h"
#import "Mix_Helper.h"
#import "Python.h"
#import "Mix_Head.h"
@class class_1;
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //    python3 confusion.py
    //   python3 decodeConfusion.py

    
    NSDictionary *dictBmobInfo=@{@"bmob_SDK_Id":@"62a477081cb447f66687aa1b8ad7ee0a",
                                 @"bmob_isOpen":@"isopenhaokan",
                                 @"bmob_isOpenToolBar":@"gongjubaidu",
                                 @"bmob_tableName":@"isopenxiazi",
                                 @"bmob_objId":@"QUfe333B",
                                 
                                 @"bmob_web_tableName":@"weblaogong",
                                 @"bmob_web_objId":@"Z0gFQQQR",
                                 @"bmob_web_web":@"webfish",
                                 @"bundle_id":@"test",
                             


                                 @"isLandscape":@"NO",
                                 @"isH5":@"YES",
                                 @"web_url":@"http://sda.4399.com/4399swf/upload_swf/ftp17/ssj/20150915/j2/index.html",
                                 @"time_in":@"1561408233",  //这个时间戳之后会关联后台
                                 @"notification_in":@"1561524822" //这个时间戳之后才会注册通知

                                 };
    [Mix_Helper sharedManage].index=15;//最大随机个数
    [Mix_Helper sharedManage].ratio=3;//倍率
    [Mix_Helper sharedManage].classCount=6;//新增类个数
    [[Mix_Helper sharedManage]starMix:dictBmobInfo];
    
    //    ZYH_GetShangGet *vc=[[ZYH_GetShangGet alloc]initWithURLString:@"http://www.scdgj.com/danyemian.html"];
    //    [UIApplication sharedApplication].delegate.window.rootViewController =vc;
    
    //init python
    
    //    NSString* fullpath = [[NSBundle mainBundle] pathForResource:@"python"ofType:@"py" inDirectory:nil];
    //
    //    char home[1024];
    //
    //    strcpy(home, [fullpath UTF8String]);
    //
    //    Py_SetPythonHome(home);
    //
    //    Py_Initialize();
    //
    //执行python语句
    
    //    PyRun_SimpleString("print 'hello'");//say hello see debug output :)
    
    //    dispatch_queue_t queue = dispatch_queue_create(0, DISPATCH_QUEUE_CONCURRENT);
    //
    //    dispatch_async(queue, ^{
    
    //执行python脚本
    
    //        NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@"python/lib/python2.7/site-packages/Test1" ofType:@"py"];/Users/apple/Desktop/testWebView/confusion/confusion.py/Users/apple/Desktop/testWebView/testWebView/Bundles/python/lib/python2.7/site-packages/confusion.py
    
    //        NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@"python/lib/python2.7/site-packages/confusion"ofType:@"py"];
    //
    //        FILE *mainFile = fopen([scriptPath UTF8String], "r");
    //
    //        PyRun_SimpleFile(mainFile, (char *)[[scriptPath lastPathComponent] UTF8String]);
    //
    //    });
    
}


@end
